package com.derbysoft.ota.application.translator.rq;

import com.derbysoft.ota.interfaces.protocol._2009a.HotelReservationIDsType;
import com.derbysoft.ota.interfaces.protocol._2009a.HotelReservationType;
import com.derbysoft.ota.interfaces.protocol._2009a.HotelReservationsType;
import com.derbysoft.ota.interfaces.protocol._2009a.ResGlobalInfoType;
import com.derbysoft.ota.interfaces.protocol._2009a.HotelReservationIDsType.HotelReservationID;

public abstract class HotelReservationsTypes {

	public static HotelReservationsType of(String type, String value, String reservationIdSource) {
		HotelReservationsType reservationsType = new HotelReservationsType();
		HotelReservationType reservationType = new HotelReservationType();
		ResGlobalInfoType globalInfoType = new ResGlobalInfoType();
		HotelReservationIDsType reservationIDsType = new HotelReservationIDsType();
		HotelReservationID reservationId = new HotelReservationID();
		reservationId.setResIDType(type);
		reservationId.setResIDValue(value);
		reservationId.setResIDSource(reservationIdSource);
		reservationIDsType.getHotelReservationID().add(reservationId);
		globalInfoType.setHotelReservationIDs(reservationIDsType);
		reservationType.setResGlobalInfo(globalInfoType);
		reservationsType.getHotelReservation().add(reservationType);
		return reservationsType;
	}

}
